package com.desire.mapper;

import com.desire.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.Map;

/**
 * @author LittleDesire
 * @description
 * @date 2022-04-12 周二 14:56
 * @since 17
 */
@Mapper
public interface StudentMapper {
    @Insert("insert oadb.t_student(student_name) value (#{name})")
    @Options(useGeneratedKeys = true,keyColumn = "student_id",keyProperty = "id")
    int addStudent(Student student);

    @Insert("insert oadb.t_student(student_name) value (#{name})")
    @Options(useGeneratedKeys = true,keyColumn = "student_id",keyProperty = "id")
    int saveStudent(Map<String, Object> map);

    int insertStudent(Student student);
}
